package com.yhd.prototype;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * @author yhd
 * @email yinhuidong1@xiaomi.com
 * @description TODO
 * @since 2021/5/22 下午4:54
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class Person  implements Cloneable{

    private String name;

    private Integer age;

    @Override
    protected Person clone() throws CloneNotSupportedException {

        return new Person().setName(this.getName()).setAge(this.getAge());
    }
}
